#pragma once
#include "Obstacle.h"

class Level;
class Player;
class Tile;

class Portal : public Obstacle {
protected:
	bool m_up;
	int m_portalNum;
	Level* m_level;
public:
	Portal(bool up, int portalNum, Level* level);
	Portal(Tile* tile, std::ifstream& file);
	~Portal();
	bool isUp() const;
	void render(float x, float y);
	void takePortal(Player* player);
	Level* getLevel() const;
	void save(std::ofstream& file) const;
	int getPortalNum() const;
};

inline bool Portal::isUp() const {return m_up;}
inline Level* Portal::getLevel() const {return m_level;}
inline int Portal::getPortalNum() const {return m_portalNum;}

